home *** CD-ROM | disk | FTP | other *** search
Text File | 1992-11-10 | 2.7 KB | 98 lines | [TEXT/MPS ] |
- #################################################################
- # #
- # MPW Shell script to install the Icon Programming Language, #
- # MPW version. #
- # #
- # To install Icon in your system, insert the MPWIcon disk into #
- # a disk drive and enter the command: #
- # #
- # MPWIcon:InstallIcon #
- # #
- #################################################################
-
- Set Exit 0
- #
- # Figure out the installation disk path.
- #
- (Evaluate "{0}" =~ /(≈:)®1[¬:]+/) > Dev:Null
- Set install "{®1}"
- Directory "{install}"
- Loop
- If ¬("`Exists -d -q Icon`" && "`Exists -f -q UserStartup•Icon`")
- Set install "`GetFileName -d -m -q "Where is ∂"MPW Icon∂" distribution disk?"`"
- Exit if "{install}" == ""
- Else
- Break
- End
- End
- #
- # Select the folder for Icon installation.
- #
- Alert -s "Macintosh MPW Icon Language Installation∂n∂n ∂
- MPW Icon can be installed anywhere at all -- the standard ∂
- location is in a folder named Icon in your MPW folder."
- Set x "`GetListItem -q -m "Install Icon in:" ∂
- "Existing Icon folder" "New Icon folder"`"
- Exit if "{x}" == ""
- If "{x}" == "Existing Icon folder"
- If "{Icon}" != ""
- Directory "{Icon}" ≥ Dev:Null
- If {Status} != 0
- If "`Exists -q "{MPW}Icon:"`"
- Directory "{MPW}Icon:"
- End
- End
- Else
- Directory "{MPW}Icon:" ≥ Dev:Null
- End
- Set Icon "`GetFileName -q -m "Select ∂"Icon∂" folder" -d -b Install`"
- Exit if "{Icon}" == ""
- Directory "{Icon}"
- #
- # Delete obsolete V7.0 files that won't be overwritten.
- #
- Delete -i itran ilink iconm iconx.hdr bin ≥ Dev:Null
- Else # New folder
- Directory "{MPW}"
- Set Icon "`GetFileName -p -q -m "Create ∂"Icon∂" folder" -b Install`"
- Exit if "{Icon}" == ""
- If "{Icon}" !~ /≈:/
- Set Icon "{Icon}:"
- End
- Delete -i -y "{Icon}"
- Exit 1 if {Status}
- NewFolder "{Icon}"
- Exit if {Status}
- End
- Echo "# Installing Icon from ∂"{install}∂" into ∂"{Icon}∂"".
- #
- # Install the new stuff.
- #
- Directory "{install}Icon:"
- Duplicate -p -y icont iconx Icon.help IconMPWTool "{Icon}"
- Set x 0
- If "`Exists -q "{MPW}UserStartup•Icon"`"
- Confirm "OK to overwrite {MPW}UserStartup•Icon?"
- Set x {status}
- End
- If {x} == 0
- Duplicate -p -y "{install}UserStartup•Icon" "{MPW}"
- If "{Icon}" !~ /{MPW}Icon:/
- Target "{MPW}UserStartup•Icon"
- Find •
- Find /•Set Icon /
- Replace /∂{MPW∂}Icon:/ "`Files -i -f -q "{Icon}"`"
- Close -y "{Target}"
- End
- Else
- Alert "Since you didn't install the UserStartup•Icon file, ∂
- don't forget to reinstall later, or manually add the necessary ∂
- commands to a UserStartup file."
- End
- Directory "{MPW}"
- Alert -s "Icon installation complete -- now quit and restart MPW Shell.∂
- ∂n## IMPORTANT ##∂nIf you are running ∂
- pre-3.0 MPW Shell, you must add ∂"Execute UserStartup•Icon∂" ∂
- to your UserStartup file."
- Exit 0
-